Fix iteminfo tests and refactor pocket display #40314
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
SUMMARY: Infrastructure "Fix iteminfo tests and refactor pocket display"
Purpose of change
Several
iteminfo_test
cases were failing with nested containers due to not having aniteminfo_parts
flag to toggle the display of pocket info and their nested contents.Describe the solution
In the item info display, pocket "general_info" display is now shown only if the new
iteminfo_parts::DESCRIPTION_POCKETS
flag is given, and contents info is only added ifiteminfo_parts::DESCRIPTION_CONTENTS
is given.These changes allow 3 of the formerly failing iteminfo_test assertions to pass. The other 2 formerly failing tests related to
BASE_RIGIDITY
, which is handled at the pocket level now), so the "item rigidity" tests were simply removed (as they will need a complete rewrite anyhow).Describe alternatives you've considered
Hands in pockets
Testing
tests/cata_test [iteminfo]
Additional context
I plan to follow up with some new iteminfo test cases covering pockets and containers, but for now my goal was to simply re-align the cogs.